<!DOCTYPE html>
<html lang="zh_CN" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body>
    <div class="wrapper wrapper-content">
    
        <div class="btn-group hidden-xs" id="tableToolbar" role="group">
        <button class="btn btn-outline btn-default" th:onclick="'javascript:add()'" shiro:hasPermission="${model.modulePackage}:${model.modelL}:add">
            <i class="fa fa-plus"></i> 新增
        </button>
        <button class="btn btn-outline btn-default" th:onclick="'javascript:batchRemove()'" shiro:hasPermission="${model.modulePackage}:${model.modelL}:batchRemove">
             <i class="fa fa-trash-o"></i> 删除
        </button>
         <form class="form-horizontal" id="form-sysDemo-add"><!-- 必须保存，不然下拉选择无法使用 -->
#foreach( $field in $fieldList )
#if(${field.matchType}=="any"||${field.matchType}=="eq"||${field.matchType}=="left"||${field.matchType}=="right")
        <div class="col-xs-3" style="margin-bottom: 10px;">
			<div class="input-group">
				<div class="input-group-btn">
					<button class="btn btn-white" type="button">${field.comment}</button>
				</div>
				<input type="text" class="form-control" id="${field.field}" placeholder="请输入${field.comment}" title="请输入${field.comment}">
			</div>
		</div>
#elseif(${field.matchType}=="select"&&${field.inputType}=="select"&&${field.inputValueTwo}== "")
		<div class="col-xs-3" style="margin-bottom: 10px;">
			<div class="input-group">
				 <div class="input-group-btn">
					 <button class="btn btn-white" type="button">${field.comment}</button>
				 </div>
				 <select class="form-control input-s-sm inline" id="${field.field}" th:with="type=${@dictService.selectDictData('${field.inputValue}')}">
					<option value="">请选择</option>
					<option th:each="e : ${type}" th:text="${e['dictLabel']}" th:value="${e['dictValue']}"></option>
				</select>
			 </div>
		</div>
#elseif(${field.matchType}=="select"&&${field.inputType}=="select"&&${field.inputValueTwo}!= "")
		<div class="col-xs-3" style="margin-bottom: 10px;">
			<div class="input-group">
				 <div class="input-group-btn">
					 <button class="btn btn-white" type="button">${field.comment}</button>
				 </div>
				 <select id="${field.field}" name="${field.field}" class="form-control input-s-sm inline"  th:with="type=${ @${field.inputValueOneU}ServiceImpl.selectAll()}">
                   <option value="">请选择</option>
                   <option th:each="dict : ${type}" th:text="${ dict['${field.inputValueTwoL}']}" th:value="${dict['id']}"></option>
               </select>
			 </div>
		</div>
#elseif(${field.matchType} == "select"&&${field.inputType} == "radio")
		<div class="col-xs-3" style="margin-bottom: 10px;">
			<div class="input-group">
				 <div class="input-group-btn">
					 <button class="btn btn-white" type="button">${field.comment}</button>
				 </div>
				 <select class="form-control input-s-sm inline" id="${field.field}">
					<option value="">请选择</option>
					<option value="0">正常</option>
					<option value="1">禁用</option>
				</select>
			 </div>
		</div>
#elseif(${field.matchType}=="numberRange")
		<div class="col-xs-3" style="margin-bottom: 10px;">
			<div class="input-group">
				<div class="input-group-btn">
					<button class="btn btn-white" type="button">${field.comment}</button>
				</div>
				 <input type="text" class="form-control" id="${field.field}_start" placeholder="起始${field.comment}" title="起始${field.comment}" style="width:46%">
				 <span class="form-control-span-line">-</span>
				 <input type="text" class="form-control" id="${field.field}_end" placeholder="截止${field.comment}" title="截止${field.comment}" style="width:46%;">
			 </div>
		</div>
#elseif(${field.matchType}=="dateRange")
		<div class="col-xs-3" style="margin-bottom: 10px;width: 30%;">
			<div class="input-group">
				<div class="input-group-btn">
					<button class="btn btn-white" type="button">${field.comment}</button>
				</div>
				<div class="input-group"> 
					<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
	       			<input type="text" id="${field.field}Start" class="form-control" value="" placeholder="yyyy-MM-dd" style="width: 80%;" title="yyyy-MM-dd"/>
					<span class="form-control-span-line">-</span>
					<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
	       			<input type="text" id="${field.field}End" class="form-control" value="" placeholder="yyyy-MM-dd"  style="width: 80%;" title="yyyy-MM-dd"/>
    			</div>
			 </div>
		</div>
#end
#end
		</form> 
        </div>
        <table class="bootstrap-table" data-mobile-responsive="true">
        </table>
    </div>
    <div th:include="include :: footer"></div>
    <script th:src="@{/jee/${model.modulePackage}/${model.modelL}/list.js}"></script>
    <script th:inline="javascript">

        layui.use('laydate', function(){
	  	var laydate = layui.laydate;
#foreach($field in $fieldList)
#if(${field.matchType}=="dateRange")
		  laydate.render({
		    elem: '#${field.field}Start'
		  });
		   laydate.render({
		    elem: '#${field.field}End'
		  });
#end
#end	  
	   });
        var editFlag = [[${@permissionService.hasPermi('${model.modulePackage}:${model.modelL}:edit')}]];
        var removeFlag = [[${@permissionService.hasPermi('${model.modulePackage}:${model.modelL}:remove')}]];
        var detailFlag = [[${@permissionService.hasPermi('${model.modulePackage}:${model.modelL}:list')}]];
    </script>
</body>
</html>